/**
* 小程序；首页
*/
<template>
	<view class="page" >
		<Loading class="loading1" v-show="!isLoading" :isStatus='loadStatus'></Loading>
		<couponVue class="packBox" ref="RedPack" @changeStatus="changeStatu"></couponVue>
		<view class="cu-modal drawer-modal justify-start" :class="isCategory==true?'show':''" @tap="hideModal">
			<view class="cu-dialog basis-lg" @tap.stop=""
				:style="[{top:CustomBar+'px',height:'calc(100vh - ' + CustomBar + 'px)'}]">
				<view class="cu-list menu text-left">
					<view class="cu-item arrow " v-for="(item,index) in categoryList" :key="index" @click="click_category(item.catid,item.catname,index)" v-if="item.parentid!=0">
						<view class="content">
							<view><text class="cuIcon-footprint cu-item-hover"  v-if="categoryIndex==index"></text> {{item.catname}}</view>
						</view>
					</view>
					<view class="" v-if="categoryList==''">
						暂无数据
					</view>
				</view>
			</view>
		</view>
		<scroll-view scroll-y class="box" :style="{height:bodtyH+'px'}" @scroll="gundong" :scroll-top="scrollP"
			@scrolltolower="gundongButton">
			<view class="animation-slide-bottom">
				<Rotation :dat='lunBoData' v-if="lunBoData.length>0" @clickActive="toGoods"></Rotation>
			</view>
			<view class="listBox">
				<view class="listCard animation-slide-bottom" v-for="(item,index) in courseList" v-if="item.thumb!=''"
					:style="[{animationDelay: (index + 1)*0.1 + 's'}]" @click="toGoods(item.id)">
					<view class="listImgBox">
						<image class="imgBox" :src="item.thumb"   mode="aspectFill" lazy-load="true"></image>

					</view>
					<view class="listXiBox">
						<view class="titleBox">
							{{item.title}}
						</view>
						<view class="padding-xs">
							<view class='cu-tag light bg-cyan'>{{item.copyfrom}}</view>
							<view class='cu-tag light bg-purple' v-show="item.keywords!=''">{{item.keywords}}</view>
						</view>
						<view class="list-text-desc">
							{{item.click}} 人预览
							<text style="margin-left: 10%;">于{{todate(item.updatetime)}}更新</text>
						</view>
					</view>
				</view>
			</view>

			<view class="isLoad-box">
				<view class="cu-load " :class="scrollData.isload"></view>
			</view>
			<view class="footBox" :style="{height:footH+'px'}">

			</view>
		</scroll-view>

	</view>
</template>

<script src="./index.js"></script>

<style>
	@import "index.css";
</style>
